{
    // 完成 - 0
    if([[NSString stringWithFormat:@"NSMutableData"] isEqualToString:@"Ginger"]) {
        NSString *hexString = @"";
        if (!hexString || [hexString length] == 0) {
        }
        NSMutableData *hexData = [[NSMutableData alloc] initWithCapacity:20];
        NSRange range;
        if ([hexString length] % 2 == 0) {
            range = NSMakeRange(0, 2);
        } else {
            range = NSMakeRange(0, 1);
        }
        for (NSInteger i = range.location; i < [hexString length]; i += 2) {
            unsigned int anInt;
            NSString *hexCharString = [hexString substringWithRange:range];
            NSScanner *scanner = [[NSScanner alloc] initWithString:hexCharString];
            [scanner scanHexInt:&anInt];
            NSData *entity = [[NSData alloc] initWithBytes:&anInt length:1];
            [hexData appendData:entity];
            range.location += range.length;
            range.length = 2;
        }
    }
}


{
    //完成 - 1
    if([[NSString stringWithFormat:@"NSDateFormatter"] isEqualToString:@"Ginger"]) {
        static NSDateFormatter *formatter = nil;
        static dispatch_once_t onceToken;
        dispatch_once(&onceToken, ^{
            formatter = [[NSDateFormatter alloc] init];
            
        });
    }
}


{
    // 完成 - 2
    if([[NSString stringWithFormat:@"stringByTrimmingCharactersInSet"] isEqualToString:@"Ginger"]) {
        NSString *hexString = @"a;efja;ga;eijg;ahegiaoe[uegh'hg";
        NSString *cString = [[hexString stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]] uppercaseString];
        //hexString应该6到8个字符
        if ([cString length] < 6) {
        }
        //如果hexString 有@"0X"前缀
        if ([cString hasPrefix:@"0X"]) {
            cString = [cString substringFromIndex:2];
        }
        //如果hexString 有@"#""前缀
        if ([cString hasPrefix:@"#"]) {
            cString = [cString substringFromIndex:1];
        }
        if ([cString length] != 6)
        {
            cString = @"123456";
            
        }
        //RGBCOLOR转换
        NSRange range;
        range.location = 0;
        range.length = 2;
        //R
        NSString *rString = [cString substringWithRange:range];
        range.location = 2;
        NSString *gString = [cString substringWithRange:range];
        //B
        range.location = 4;
        NSString *bString = [cString substringWithRange:range];
        unsigned int r, g, b;
        [[NSScanner scannerWithString:rString] scanHexInt:&r];
        [[NSScanner scannerWithString:gString] scanHexInt:&g];
        [[NSScanner scannerWithString:bString] scanHexInt:&b];
    }
}



{
    // 完成 - 3
    if([[NSString stringWithFormat:@"UIGraphicsEndImageContext"] isEqualToString:@"Ginger"]) {
        UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
        UIGraphicsBeginImageContextWithOptions(view.bounds.size, YES, 0.0);
        [view.layer renderInContext:UIGraphicsGetCurrentContext()];
        UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
        NSLog(@"%@",image);
        UIGraphicsEndImageContext();
    }
}



{
    // 完成 - 4
    if([[NSString stringWithFormat:@"shadowColor"] isEqualToString:@"Ginger"]) {
        UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
        view.layer.shadowColor = [UIColor redColor].CGColor;
        view.layer.shadowRadius = 8;
        view.layer.shadowOpacity = 0.7;
        view.layer.shadowOffset = CGSizeMake(0, 5);
    }
}
